#include "CombinationNode.h"

CombinationNode::CombinationNode(Node *node1, Node *node2, double sampleValue, bool isObserved) :
    Node(MISC, sampleValue, isObserved),
    firstNode(node1),
    secondNode(node2)
{
}

CombinationNode::CombinationNode(const CombinationNode& other) :
    Node(other),
    firstNode(other.firstNode),
    secondNode(other.secondNode)
{

}

CombinationNode::~CombinationNode()
{

}

double CombinationNode::getLastSample()
{
    return firstNode->getLastSample() + secondNode->getLastSample();
}
